home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 17
/
CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso
/
CUCD
/
Programming
/
DiceSource
/
test
/
suplib
/
getcwd.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-25
|
233b
|
19 lines
#include <stdlib.h>
#include <libc.h>
#include <sys/param.h>
char *
getcwd(char *buf, int maxlen)
{
char xbuf[MAXPATHLEN];
if (getwd(xbuf)) {
strncpy(buf, xbuf, maxlen);
return(buf);
} else {
return(NULL);
}
}